import request from '@/utils/request'
// 新增资讯
export function addArticle(data) {
    return request({
        url: '/admin/article',
        method: 'post',
        data,
		showLoading: true
    })
}
// 资讯分页
export function pagingArticle(data) {
    return request({
        url: '/admin/article/paging',
        method: 'post',
        data,
		showLoading: true
    })
}
// 资讯列表
export function listArticle(data) {
	return request({
		url: '/admin/article/list',
		method: 'post',
		data,
		showLoading: true
	})
}
// 资讯详情
export function getArticleDetail(id) {
    return request({
        url: '/admin/article/' + id,
        method: 'get',
		showLoading: true
    })
}
// 修改资讯
export function editArticle(data) {
    return request({
        url: '/admin/article',
        method: 'put',
        data,
		showLoading: true
    })
}
// 批量删除资讯
export function delArticle(idList) {
	return request({
		url: '/admin/article/' + idList,
		method: 'delete',
		showLoading: true
	})
}
// 上下架
export function publishArticle(data) {
	return request({
		url: '/admin/article/publish',
		method: 'put',
		data,
		showLoading: true
	})
}
// 标记/取消重点资讯
export function markArticle(idList) {
	return request({
		url: '/admin/article/mark/' + idList,
		method: 'put',
		showLoading: true
	})
}
